package net.lab1024.sa.base.module.support.rule.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
        * 规则步骤表实体类
 *
         * @author Generated
 * @Date 2025
        */
@TableName("rule_cep_step")
public class RuleCepStep implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
            * 步骤ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
            * 关联的规则ID
     */
    @TableField("rule_id")
    private Long ruleId;

    /**
            * 步骤顺序（从1开始）
            */
    @TableField("step_order")
    private Integer stepOrder;

    /**
            * 步骤名称
     */
    @TableField("step_name")
    private String stepName;

    /**
            * 字段映射
     */
    @TableField("step_mapping")
    private String stepMapping;

    /**
            * 事件类型: 1静态值 static 2表达式 condition 3字段映射 mapping
     */
    @TableField("event_type")
    private String eventType;

    /**
            * 条件表达式
     */
    @TableField("condition_expression")
    private String conditionExpression;

    /**
            * 为 true 的值
     */
    @TableField("tvalue")
    private String tvalue;

    /**
            * 为false的值
     */
    @TableField("fvalue")
    private String fvalue;

    /**
            * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("created_time")
    private LocalDateTime createdTime;

    /**
            * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("updated_time")
    private LocalDateTime updatedTime;

    // 构造方法
    public RuleCepStep() {
    }

    // Getter和Setter方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getRuleId() {
        return ruleId;
    }

    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    public Integer getStepOrder() {
        return stepOrder;
    }

    public void setStepOrder(Integer stepOrder) {
        this.stepOrder = stepOrder;
    }

    public String getStepName() {
        return stepName;
    }

    public void setStepName(String stepName) {
        this.stepName = stepName;
    }

    public String getStepMapping() {
        return stepMapping;
    }

    public void setStepMapping(String stepMapping) {
        this.stepMapping = stepMapping;
    }

    public String getEventType() {
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public String getConditionExpression() {
        return conditionExpression;
    }

    public void setConditionExpression(String conditionExpression) {
        this.conditionExpression = conditionExpression;
    }

    public String getTvalue() {
        return tvalue;
    }

    public void setTvalue(String tvalue) {
        this.tvalue = tvalue;
    }

    public String getFvalue() {
        return fvalue;
    }

    public void setFvalue(String fvalue) {
        this.fvalue = fvalue;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public LocalDateTime getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(LocalDateTime updatedTime) {
        this.updatedTime = updatedTime;
    }

    // toString方法
    @Override
    public String toString() {
        return "RuleCepStep{" +
                "id=" + id +
                ", ruleId=" + ruleId +
                ", stepOrder=" + stepOrder +
                ", stepName='" + stepName + '\'' +
                ", stepMapping='" + stepMapping + '\'' +
                ", eventType='" + eventType + '\'' +
                ", conditionExpression='" + conditionExpression + '\'' +
                ", tvalue='" + tvalue + '\'' +
                ", fvalue='" + fvalue + '\'' +
                ", createdTime=" + createdTime +
                ", updatedTime=" + updatedTime +
                '}';
    }
}